import request from '@/utils/request'

// 查询其他入库单列表
export function listOrderwarehousing(query) {
  return request({
    url: '/orderwarehousing/orderwarehousing/list',
    method: 'get',
    params: query
  })
}

// 查询其他入库单详细
export function getOrderwarehousing(bicycleId) {
  return request({
    url: '/orderwarehousing/orderwarehousing/' + bicycleId,
    method: 'get'
  })
}

// 新增其他入库单
export function addOrderwarehousing(data) {
  return request({
    url: '/orderwarehousing/orderwarehousing',
    method: 'post',
    data: data
  })
}

// 修改其他入库单
export function updateOrderwarehousing(data) {
  return request({
    url: '/orderwarehousing/orderwarehousing',
    method: 'put',
    data: data
  })
}

// 删除其他入库单
export function delOrderwarehousing(bicycleId) {
  return request({
    url: '/orderwarehousing/orderwarehousing/' + bicycleId,
    method: 'delete'
  })
}

// 审核
export function updateAudit(bicycleIds) {
  return request({
    url: '/orderwarehousing/orderwarehousing/updateAudit/' + bicycleIds,
    method: 'put',
  })
}
// 反审核
export function updateUnAudit(bicycleIds) {
  return request({
    url: '/orderwarehousing/orderwarehousing/updateUnAudit/' + bicycleIds,
    method: 'put',
  })
}
